package com.happy.stream.controller;

import com.happy.stream.message.StreamClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:lfeng
 * @Description:
 * @Date：创建于 2018/12/9 19:13
 */
@RestController
public class StreamController {
    @Autowired
    private StreamClient StreamClient;

    @GetMapping("send")
    public void send(){

        StreamClient.output().send(MessageBuilder.withPayload("Hello world").build());
    }

}
